package designMode.abstractFactoryPattern;

/**
 * @ClassName CheesePizza
 * @Description
 * @Author LIBOFEI
 * @Date 2020/6/23 22:34
 * @Version 1.0
 **/
public class CheesePizza extends Pizza {

    PizzaIngredientFactory pizzaIngredientFactory;

    public CheesePizza(PizzaIngredientFactory pizzaIngredientFactory){
        this.pizzaIngredientFactory = pizzaIngredientFactory;
    }

    @Override
    void prepare() {
        System.out.println("prepare...");
        Dough dough = pizzaIngredientFactory.createDough();
        Sauce sauce = pizzaIngredientFactory.createSauce();
    }
}
